package com.tjmc.tiomsresource.service.impl;

import com.tjmc.tiomscore.dao.TranPtnHwEsiMapper;
import com.tjmc.tiomscore.model.TranPtnHwEsi;
import com.tjmc.tiomsresource.parser.CMEsiParser;
import com.tjmc.tiomsresource.service.CMEsiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;

/**
 * @author Luc
 * @version 1.0
 * @date 2020-05-20 15:41
 */
@Service("cmEsiService")
public class CMEsiServiceImpl extends CMSuperServiceImpl<TranPtnHwEsi> implements CMEsiService {

    @Autowired
    private CMEsiParser cmEsiParser;
    @Autowired
    private TranPtnHwEsiMapper tranPtnHwEsiMapper;

    @Override
    public CMEsiParser getParser() {
        return cmEsiParser;
    }

    @Override
    public TranPtnHwEsiMapper getMapper() {
        return tranPtnHwEsiMapper;
    }

    @Override
    public boolean saveTranPtnHwDataToDB(List<File> xmlFiles) {
        return this.saveTranPtnHwDataToDB(xmlFiles, "ESI");
    }
}
